package PTA.Mianxiangduixiang.ex29;

import java.util.Scanner;

class Rectangle{
    private double width=1;
    private double height=1;

    public Rectangle() {
    }

    public Rectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }
    public double getArea(){
        return width*height;
    }
    public double getPerimeter(){
        return (width+height)*2;
    }

}


public class ex29 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double a1 = sc.nextDouble();
        double b1 = sc.nextDouble();
        Rectangle r1 = new Rectangle(a1,b1);
        System.out.print(a1+" "+b1+" "+r1.getArea()+" "+r1.getPerimeter());
        System.out.println();
        double a2 = sc.nextDouble();
        double b2 = sc.nextDouble();
        Rectangle r2 = new Rectangle(a2,b2);
        System.out.print(a2+" "+b2+" "+r2.getArea()+" "+r2.getPerimeter());

    }
}
